-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Couple of changes to make it easier to compile rustc for wasm #130899
Conversation
This is a subset of the patches I have on my rust fork to compile rustc for wasm32-wasip1.
r? @davidtwco rustbot has assigned @davidtwco. Use |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
dd7dfe8
to
ee6d837
Compare
This comment has been minimized.
This comment has been minimized.
ee6d837
to
bf1f5c9
Compare
Added a couple more fixes. |
@bors r+ |
…kingjubilee Rollup of 7 pull requests Successful merges: - rust-lang#128721 (Don't allow the `#[pointee]` attribute where it doesn't belong) - rust-lang#130479 (skip in-tree compiler build for llvm-bitcode-linker if ci-rustc is on) - rust-lang#130899 (Couple of changes to make it easier to compile rustc for wasm) - rust-lang#131225 (`rustc_borrowck` memory management tweaks) - rust-lang#131351 (Remove valgrind test suite and support from compiletest, bootstrap and opt-dist) - rust-lang#131359 (Fix used_underscore_binding in rustc_serialize) - rust-lang#131367 (Mark Boxy as on vacation) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#130899 - bjorn3:wasi_bootstrap_fixes, r=davidtwco Couple of changes to make it easier to compile rustc for wasm This is a subset of the patches I have on my rust fork to compile rustc for wasm32-wasip1.
I'm guessing this didn't fail in CI as we default to using rpaths, while these distros/OSes don't? |
Most likely yeah. |
cargo.arg("-Zdual-proc-macros"); | ||
rustflags.arg("-Zdual-proc-macros"); | ||
let error = command(self.rustc(compiler)) | ||
.arg("--target") | ||
.arg(target.rustc_target_arg()) | ||
.arg("--print=file-names") | ||
.arg("--crate-type=proc-macro") | ||
.arg("-") | ||
.run_capture(self) | ||
.stderr(); | ||
let not_supported = error | ||
.lines() | ||
.any(|line| line.contains("unsupported crate type `proc-macro`")); | ||
if !not_supported { | ||
cargo.arg("-Zdual-proc-macros"); | ||
rustflags.arg("-Zdual-proc-macros"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would adding rpath
check here fix the regression?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think self.rustc()
may be missing code to set LD_LIBRARY_PATH
. If LD_LIBRARY_PATH
is set correctly it should work even with rpath disabled.
This is a subset of the patches I have on my rust fork to compile rustc for wasm32-wasip1.